//弹性盒模型
@mixin flex($justify, $align) {
  display: flex;
  justify-content: $justify;
  align-items: $align;
}
//两端对齐
@mixin text_justify_line($width, $height) {
  display: inline-block;
  text-align: justify;
  overflow: hidden;
  width: $width;
  height: $height;
  line-height: $height;
  i {
    display: inline-block;
    width: 100%;
    height: 0;
  }
}

//单行长文本截断
@mixin text_cut_line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

//多行长文本截断
@mixin text_cut_more($line) {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: $line;
  -webkit-box-orient: vertical;
}

//开关
@mixin switch($width, $height) {
  width: $width;
  height: $height;
  & :deep(.van-switch) {
    width: $width;
    height: $height;
    border: 1px solid rgba(0, 0, 0, 0.1);
    // border-radius: $height;
    // box-sizing: border-box;
  }
  & :deep(.van-switch__node) {
    width: $height;
    height: $height;
  }
  & :deep(.van-switch--on .van-switch__node) {
    transform: translateX($width - $height);
  }
}
